//
//  mm_jobItemGroupViewController.h
//  HondaPro_2
//
//  Created by Eric on 13-7-31.
//  Copyright (c) 2013年 glendale. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MainMenuDataModel.h"
#import "HelpClass.h"
#import "DDPopoverBackgroundView.h"
#import "popContentViewController.h"
#import "SVProgressHUD.h"

@protocol mm_jobItemGroupViewControllerDelegate <NSObject>

@optional
-(void)repairAndPartListDataChanged;

@end

@interface mm_jobItemGroupViewController : UIViewController <ContentViewControllerDelegate,UIAlertViewDelegate>
{
    //下拉菜单的属性
    popContentViewController *_contentCon;
    UIPopoverController *_popCon;
    
    //继续成组录入的警示框
    UIAlertView *_alertViewToContinuouslyAddJobItemGroup;
}

//外部属性
@property (strong,nonatomic) NSArray *arrOriginalDataForServiceType;
@property (strong,nonatomic) NSMutableArray *arrDisDataForServiceType;
@property (strong,nonatomic) NSArray *arrOriginalDataForRepairType;
@property (strong,nonatomic) NSMutableArray *arrDisDataForRepairType;
@property (strong,nonatomic) NSArray *arrOriginalDataForWorkShop;
@property (strong,nonatomic) NSMutableArray *arrDisDataForWorkShop;

@property(nonatomic,assign)double repairDiscount;
@property(nonatomic,assign)double partDiscount;

@property (strong, nonatomic) IBOutlet UITableView *repairItemTableViewDis;
@property (strong, nonatomic) IBOutlet UITableView *partTableViewDis;

@property (strong, nonatomic) IBOutlet UITextField *jobItemGroupNameTxt;

@property(nonatomic,weak)id<mm_jobItemGroupViewControllerDelegate> delegate;

//返回上一级导航界面
//返回上一级导航控制器回调方法
- (IBAction)backBtnPressed:(UIButton *)sender;
//车型选择按钮回调方法
- (IBAction)carTypePressed:(UIButton *)sender;

//确定添加按钮回调方法
- (IBAction)addOkBtnPressed:(UIButton *)sender;
//连续添加按钮回调方法
- (IBAction)continuously:(UIButton *)sender;

//创建下拉菜单
-(void)createThePopViewControl:(UIButton *)sender;
//进入界面时的初始化操作
-(void)initJobItemGroupAtFirst;
//添加一条作业指示到用户陈述的作业指示列表中
-(void)addOneIndicationToIndicationList;
//根据列表的编号取服务类型的ID
-(NSString *)getServiceTypeIdByRowSel:(NSInteger)rowSel;
//根据列表的编号取修理类型的ID
-(NSString *)getRepairTypeIdByRowSel:(NSInteger)rowSel;

@end
